<?php
/**
 * @project     : Travel
 * @copyright   : 
 * @desc        : Thuc hien cac thao tac tren bang user
 * @coder       : Truong cong quyen
 * @createdate  : 3/11/2011
*/
class User_model extends CI_Model
{
    var $user_id=0;
    var $group_id='';
    var $user_name='';
    var $user_pass='';
    var $user_fullname='';
    var $user_gender='';
    var $user_birthday='';
    var $user_email='';
    var $user_phone='';
    var $user_mobile='';
    var $user_address='';
    var $user_zone='';
    var $user_province='';
    var $user_date_created='';
    var $user_last_visit='';
    var $user_favorites='';
    var $user_image='';
    var $user_ym='';
    var $user_status=1;
    
    
    
    public function __construct() {
        parent::__construct();
    }
    
    function get_all($status=1)
    {
        if($status!=-1)
        {
            $this->db->where('user_status', $status);
        }
        $query = $this->db->get('user');
        return $query->result();
        
    }
    
     function get_by_id($id)
    {
        $this->db->where('user_id', $id);
        $query = $this->db->get('user');
        return $query->row();
    }
    

}